  /**
   * Generate time : 2016-04-27 14:08:31
   * Version : 1.0.1.V20070717
   */
package com.baosight.sczx.zm.cn.domain;

import com.baosight.iplat4j.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;
/**
 * ZMCNStock 
 * table comment : 库存数据 
 */
public class ZMCNStock extends DaoEPBase {

	private String fdKeyId = " ";		/* 主键*/
	private String fdVirtualDate = " ";		/* 调度日期*/
	private String fdCurrentDate = " ";		/* 当前日期*/
	private String fdYear = " ";		/* 年份*/
	private String fdMonth = " ";		/* 月份*/
	private BigDecimal fdStockValue = new BigDecimal("0");		/* 库存量*/
	private String fdStockPalce = " ";		/* 存放地点*/
	/**
	 * initialize the metadata 
	 */
	public void initMetaData() {
		EiColumn eiColumn;
		
	eiColumn = new EiColumn("fdKeyId");
	eiColumn.setPrimaryKey(true);
	eiColumn.setFieldLength(32);	
	eiColumn.setDescName("主键");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdVirtualDate");
	eiColumn.setFieldLength(10);	
	eiColumn.setDescName("调度日期");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdCurrentDate");
	eiColumn.setFieldLength(10);	
	eiColumn.setDescName("当前日期");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdYear");
	eiColumn.setFieldLength(4);	
	eiColumn.setDescName("年份");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdMonth");
	eiColumn.setFieldLength(2);	
	eiColumn.setDescName("月份");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdStockValue");
	eiColumn.setType("N");
	eiColumn.setScaleLength(5);
	eiColumn.setFieldLength(20);
	eiColumn.setDescName("库存量");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdStockPalce");
	eiColumn.setFieldLength(20);	
	eiColumn.setDescName("存放地点");
	eiMetadata.addMeta(eiColumn);
	

	}
	/**
	 * the constructor
	 */
	public ZMCNStock() {
		initMetaData();
	}
	
	/**
	 * get the fdKeyId - 主键
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}
	
	/**
	 * set the fdKeyId - 主键
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}
	/**
	 * get the fdVirtualDate - 调度日期
	 * @return the fdVirtualDate
	 */
	public String getFdVirtualDate() {
		return this.fdVirtualDate;
	}
	
	/**
	 * set the fdVirtualDate - 调度日期
	 */
	public void setFdVirtualDate(String fdVirtualDate) {
		this.fdVirtualDate = fdVirtualDate;
	}
	/**
	 * get the fdCurrentDate - 当前日期
	 * @return the fdCurrentDate
	 */
	public String getFdCurrentDate() {
		return this.fdCurrentDate;
	}
	
	/**
	 * set the fdCurrentDate - 当前日期
	 */
	public void setFdCurrentDate(String fdCurrentDate) {
		this.fdCurrentDate = fdCurrentDate;
	}
	/**
	 * get the fdYear - 年份
	 * @return the fdYear
	 */
	public String getFdYear() {
		return this.fdYear;
	}
	
	/**
	 * set the fdYear - 年份
	 */
	public void setFdYear(String fdYear) {
		this.fdYear = fdYear;
	}
	/**
	 * get the fdMonth - 月份
	 * @return the fdMonth
	 */
	public String getFdMonth() {
		return this.fdMonth;
	}
	
	/**
	 * set the fdMonth - 月份
	 */
	public void setFdMonth(String fdMonth) {
		this.fdMonth = fdMonth;
	}
	/**
	 * get the fdStockValue - 库存量
	 * @return the fdStockValue
	 */
	public BigDecimal getFdStockValue() {
		return this.fdStockValue;
	}
	
	/**
	 * set the fdStockValue - 库存量
	 */
	public void setFdStockValue(BigDecimal fdStockValue) {
		this.fdStockValue = fdStockValue;
	}
	/**
	 * get the fdStockPalce - 存放地点
	 * @return the fdStockPalce
	 */
	public String getFdStockPalce() {
		return this.fdStockPalce;
	}
	
	/**
	 * set the fdStockPalce - 存放地点
	 */
	public void setFdStockPalce(String fdStockPalce) {
		this.fdStockPalce = fdStockPalce;
	}
	/**
	 * get the value from Map
	 */
	public void fromMap(Map map) {
	
		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdVirtualDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdVirtualDate")), fdVirtualDate));
		setFdCurrentDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCurrentDate")), fdCurrentDate));
		setFdYear(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdYear")), fdYear));
		setFdMonth(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMonth")), fdMonth));
		setFdStockValue(NumberUtils.toBigDecimal(StringUtils.toString(map.get("fdStockValue")), fdStockValue));
		setFdStockPalce(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStockPalce")), fdStockPalce));
	}
	
	/**
	 * set the value to Map
	 */
	public Map toMap() {
		
		Map map = new HashMap();
			map.put("fdKeyId",StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));	
			map.put("fdVirtualDate",StringUtils.toString(fdVirtualDate, eiMetadata.getMeta("fdVirtualDate")));	
			map.put("fdCurrentDate",StringUtils.toString(fdCurrentDate, eiMetadata.getMeta("fdCurrentDate")));	
			map.put("fdYear",StringUtils.toString(fdYear, eiMetadata.getMeta("fdYear")));	
			map.put("fdMonth",StringUtils.toString(fdMonth, eiMetadata.getMeta("fdMonth")));	
			map.put("fdStockValue",StringUtils.toString(fdStockValue, eiMetadata.getMeta("fdStockValue")));	
			map.put("fdStockPalce",StringUtils.toString(fdStockPalce, eiMetadata.getMeta("fdStockPalce")));	
			
		return map;
	
	}
}